import request from '../utils/axios'
export function fixKey(data) {   //修改密码
    return request({
      method: 'post',
      url: '/set/changePassword',
      data: data
    })
  }
export function postOld(data) {   //验证旧密码
  return request({
    method: 'post',
    url: '/set/modifyPassword',
    data: data
  })
}
export function removePerson(data) {   //移出班级
  return request({
    method: 'post',
    url: '/set/removePerson',
    data: data
  })
}

export function sendCode(data) {   //发送验证码
  return request({
    method: 'post',
    url: '/set/modifyEmail',
    data: data
  })
}

export function verifyEmail(data) {   //核验验证码并解绑
  return request({
    method: 'post',
    url: '/set/verifyEmail',
    data: data
  })
}
export function bindEmail(data) {   //绑定
  return request({
    method: 'post',
    url: '/set/changeEmail',
    data: data
  })
}
export function getSchoolList(data) {   //获取校区列表
  return request({
    method: 'get',
    url: '/campus/getCampus',
    params: data
  })
}
export function postGoods(data) {   //二手交易发布商品的接口
  return request({
    method: 'post',
    url: '/secondGoods/create',
    data: data
  })
}
// 
export function getGoodsList(data) {   //获取二手商品列表
  return request({
    method: 'get',
    url: '/secondGoods/getStore',
    params: data
  })
}
export function getChanging(data) {   //获取二手商品交易中列表
  return request({
    method: 'get',
    url: '/secondGoods/getChanging',
    params: data
  })
}

export function getHistory(data) {   //获取二手交易记录
  return request({
    method: 'get',
    url: '/secondGoods/getHistory',
    params: data
  })
}
export function getGoodDetail(data) {   //获取二手商品
  return request({
    method: 'get',
    url: '/secondGoods/getGoodDetail',
    params: data
  })
}
export function orderGood(data) {   //订单接口
  return request({
    method: 'post',
    url: '/secondGoods/orderGood',
    data: data
  })
}
export function updateHeat(data) {   //顶一下热度接口
  return request({
    method: 'post',
    url: '/secondGoods/updateHeat',
    data: data
  })
}

export function recallGood(data) {   //撤回商品
  return request({
    method: 'post',
    url: '/secondGoods/recallGood',
    data: data
  })
}
export function saleTalk(data) {   //出售
  return request({
    method: 'post',
    url: '/secondGoods/sale',
    data: data
  })
}
export function orderMakeSure(data) {   //买家确定最终金额
  return request({
    method: 'post',
    url: '/secondGoods/orderMakeSure',
    data: data
  })
}
export function salerMakeSure(data) {   //卖家确定最终金额
  return request({
    method: 'post',
    url: '/secondGoods/salerMakeSure',
    data: data
  })
}
export function orderCancle(data) {   //买家取消订单
  return request({
    method: 'post',
    url: '/secondGoods/orderCancle',
    data: data
  })
}
export function salerMakeRefuse(data) {   //卖家驳回
  return request({
    method: 'post',
    url: '/secondGoods/salerMakeRefuse',
    data: data
  })
}

